package com.linq.cool.beauty.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * @Author: yqlin
 * @Date: 2021/2/15 03:26
 * @Description: 支付订单表
 * @Version: 1.0.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "beauty_order_pay")
public class BeautyOrderPay extends BaseEntity {
    /**
     * 支付订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 客户(会员)id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * 对应订单id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 支付金额
     */
    @TableField(value = "pay_amount")
    private BigDecimal payAmount;

    /**
     * 状态(0 支付中 1 支付成功  2支付失败)
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 是否删除(0 未删除 1已删除)
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;
}